﻿using System;
using System.Collections.Generic;
using System.Text;

namespace KG.SystemService.RelationDTO
{
    public class InputAdd
    {
        /// <summary>
        /// 起始节点id
        /// </summary>
        public string startId { get; set; }

        /// <summary>
        /// 结束节点id
        /// </summary>
        public string endId { get; set; }

        /// <summary>
        /// 关系标签
        /// </summary>
        public string type { get; set; }

        /// <summary>
        /// 关系属性
        /// </summary>
        public string Properties { get; set; }

        public void Check()
        {
            if (startId == null)
            {
                throw new Exception("起始节点id不能为空");
            }
            if (endId == null)
            {
                throw new Exception("结束节点id不能为空");
            }
            if (type == null)
            {
                throw new Exception("关系标签不能为空");
            }
            if (Properties == null)
            {
                throw new Exception("关系属性不能为空");
            }

        }
    }
}
